package com.otheima.localdatetimeformatter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Demo {//新中国成立是星期几
    public static void main(String[] args) {
        String s = "1949-10-01";
        //获取格式
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate ldt = LocalDate.parse(s,dateTimeFormatter);
        System.out.println(ldt.getDayOfWeek().getValue());


    }
}
